Field of the Invention
The present invention relates to a technique of generating an image having a wide dynamic range by composing a plurality of images shot while changing an exposure amount.
Description of the Related Art
There is conventionally known a method of generating an image having a wide dynamic range by shooting a plurality of images with few highlight-detail losses and few shadow-detail losses while changing an exposure condition, and composing the images. This is called high dynamic range (HDR) composition. Since the HDR composition processing causes a time lag in shooting between the plurality of images, it is considered to be unsuitable for shooting of a moving object. This processing generates a composite image in which the luminance varies depending on the position of the moving object and which therefore looks very unnatural.
Methods for solving such problem have been described in Japanese Patent Nos. 4282113 and 4553942.
In Japanese Patent No. 4282113, a plurality of images shot at different exposure amounts are compared to calculate a motion vector. If the magnitude of the calculated motion vector is larger than a predetermined threshold, it is determined to include an incorrectly composed portion. The pixel signals of the incorrectly composed portion are corrected based on the pixel signals of a portion other than the incorrectly composed portion.
Japanese Patent No. 4553942 describes a method of detecting and correcting a displacement between a plurality of images shot at different exposure amounts, evaluating the similarity of each portion between the images after the displacement correction processing, and changing an image composition method based on the evaluation of the similarity. This method can generate an image including a small amount of displacement due to the movement of a camera and a small amount of blur of an object due to the movement of the object. According to Japanese Patent No. 4553942, whether to compose images is determined based on the similarity, and thus it is possible to generate an image including a small amount of blur of an object while reducing the processing load.
Japanese Patent Nos. 4282113 and 4553942 basically describe processing of replacing the region of a moving object by one other image, and aim to obtain a natural image which has a uniform luminance regardless of the position of the moving object. However, these methods assume that the region of the moving object has been correctly extracted without any error.